package com.fivestar.finance.app.bean.resp;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * 简要描述
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016-04-18 17:09
 */
public class OrderListResponse implements Serializable, Parcelable {
    String orderId;// 订单ID
    String jobId;//用车任务ID
    String orderAcceptUser;//接受订单的司机
    String accceptDriverMobile;//接受订单的司机的电话
    double accceptDriverScore;//用户评分
    int orderType;//订单类型
    String orderDestination;// 订单目的地
    Double costMoney;// 扣费金额
    int orderState;// 订单状态
    String createTime;// 创建时间
    boolean overOrder;//是否可以取消订单

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getOrderAcceptUser() {
        return orderAcceptUser;
    }

    public void setOrderAcceptUser(String orderAcceptUser) {
        this.orderAcceptUser = orderAcceptUser;
    }

    public String getAccceptDriverMobile() {
        return accceptDriverMobile;
    }

    public void setAccceptDriverMobile(String accceptDriverMobile) {
        this.accceptDriverMobile = accceptDriverMobile;
    }

    public double getAccceptDriverScore() {
        return accceptDriverScore;
    }

    public void setAccceptDriverScore(double accceptDriverScore) {
        this.accceptDriverScore = accceptDriverScore;
    }

    public int getOrderType() {
        return orderType;
    }

    public void setOrderType(int orderType) {
        this.orderType = orderType;
    }

    public String getOrderDestination() {
        return orderDestination;
    }

    public void setOrderDestination(String orderDestination) {
        this.orderDestination = orderDestination;
    }

    public Double getCostMoney() {
        return costMoney;
    }

    public void setCostMoney(Double costMoney) {
        this.costMoney = costMoney;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public boolean isOverOrder() {
        return overOrder;
    }

    public void setOverOrder(boolean overOrder) {
        this.overOrder = overOrder;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.orderId);
        dest.writeString(this.jobId);
        dest.writeString(this.orderAcceptUser);
        dest.writeString(this.accceptDriverMobile);
        dest.writeDouble(this.accceptDriverScore);
        dest.writeInt(this.orderType);
        dest.writeString(this.orderDestination);
        dest.writeValue(this.costMoney);
        dest.writeInt(this.orderState);
        dest.writeString(this.createTime);
        dest.writeByte(this.overOrder ? (byte) 1 : (byte) 0);
    }

    public OrderListResponse() {
    }

    protected OrderListResponse(Parcel in) {
        this.orderId = in.readString();
        this.jobId = in.readString();
        this.orderAcceptUser = in.readString();
        this.accceptDriverMobile = in.readString();
        this.accceptDriverScore = in.readDouble();
        this.orderType = in.readInt();
        this.orderDestination = in.readString();
        this.costMoney = (Double) in.readValue(Double.class.getClassLoader());
        this.orderState = in.readInt();
        this.createTime = in.readString();
        this.overOrder = in.readByte() != 0;
    }

    public static final Creator<OrderListResponse> CREATOR = new Creator<OrderListResponse>() {
        @Override
        public OrderListResponse createFromParcel(Parcel source) {
            return new OrderListResponse(source);
        }

        @Override
        public OrderListResponse[] newArray(int size) {
            return new OrderListResponse[size];
        }
    };
}
